package cn.wolfcode.wolf2w.business.service;

import cn.wolfcode.wolf2w.business.api.domain.Answer;
import cn.wolfcode.wolf2w.business.api.domain.Question;
import cn.wolfcode.wolf2w.business.query.QuestionQuery;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * 提问信息Service接口
 * 
 * @author libai
 * @date 2024-08-10
 */
public interface IQuestionService extends IService<Question>{
    /**
    * 分页
    * @param qo
    * @return
    */
    IPage<Question> queryPage(QuestionQuery qo);

    /**
    * 获取详情问题
    * @param id
    * @return
    */
    Question getDetail(Long id);

    void answer(Answer answer, Long uid);


    void create(Question question, Long uid);

    Map<String, Object> zan(Long questionId, Long uid);

    IPage<Question> queryPageAdmin(QuestionQuery qo);

    boolean saveQuestion(Question question,Long uid);

}
